package com.example.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.entity.Course;
import com.example.entity.Major;
import com.example.repository.CourseRepository;

@Service
public class CourseService {
	@Autowired
	private CourseRepository courseRepository;

	public List<Course> getCourse() {
		return (List<Course>) courseRepository.findAll();
	}
	public Course getID(String name){
		return courseRepository.getID(name);
	}
}
